- AConfiguration_copy
void AConfiguration_copy(AConfiguration* dest, AConfiguration* src)
Copy the contents of 'src' to 'dest'.
- AConfiguration_delete
void AConfiguration_delete(AConfiguration* config)
Free an AConfiguration that was previously created with
AConfiguration_new().
- AConfiguration_diff
int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2)
Perform a diff between two configurations. Returns a bit mask of
ACONFIGURATION_* constants, each bit set meaning that configuration element
is different between them.
- AConfiguration_fromAssetManager
void AConfiguration_fromAssetManager(AConfiguration* out_, AAssetManager* am)
Create and return a new AConfiguration based on the current configuration in
use in the given {@link AAssetManager}.
- AConfiguration_getCountry
void AConfiguration_getCountry(AConfiguration* config, char* outCountry)
Return the current country code set in the configuration. The output will
be filled with an array of two characters. They are not 0-terminated. If
a country is not set, they will be 0.
- AConfiguration_getDensity
int32_t AConfiguration_getDensity(AConfiguration* config)
Return the current ACONFIGURATION_DENSITY_* set in the configuration.
- AConfiguration_getKeyboard
int32_t AConfiguration_getKeyboard(AConfiguration* config)
Return the current ACONFIGURATION_KEYBOARD_* set in the configuration.
- AConfiguration_getKeysHidden
int32_t AConfiguration_getKeysHidden(AConfiguration* config)
Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration.
- AConfiguration_getLanguage
void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage)
Return the current language code set in the configuration. The output will
be filled with an array of two characters. They are not 0-terminated. If
a language is not set, they will be 0.
- AConfiguration_getLayoutDirection
int32_t AConfiguration_getLayoutDirection(AConfiguration* config)
Return the configuration's layout direction, or
ACONFIGURATION_LAYOUTDIR_ANY if not set.
- AConfiguration_getMcc
int32_t AConfiguration_getMcc(AConfiguration* config)
Return the current MCC set in the configuration. 0 if not set.
- AConfiguration_getMnc
int32_t AConfiguration_getMnc(AConfiguration* config)
Return the current MNC set in the configuration. 0 if not set.
- AConfiguration_getNavHidden
int32_t AConfiguration_getNavHidden(AConfiguration* config)
Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration.
- AConfiguration_getNavigation
int32_t AConfiguration_getNavigation(AConfiguration* config)
Return the current ACONFIGURATION_NAVIGATION_* set in the configuration.
- AConfiguration_getOrientation
int32_t AConfiguration_getOrientation(AConfiguration* config)
Return the current ACONFIGURATION_ORIENTATION_* set in the configuration.
- AConfiguration_getScreenHeightDp
int32_t AConfiguration_getScreenHeightDp(AConfiguration* config)
Return the current configuration screen height in dp units, or
ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set.
- AConfiguration_getScreenLong
int32_t AConfiguration_getScreenLong(AConfiguration* config)
Return the current ACONFIGURATION_SCREENLONG_* set in the configuration.
- AConfiguration_getScreenRound
int32_t AConfiguration_getScreenRound(AConfiguration* config)
Return the current ACONFIGURATION_SCREENROUND_* set in the configuration.
- AConfiguration_getScreenSize
int32_t AConfiguration_getScreenSize(AConfiguration* config)
Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration.
- AConfiguration_getScreenWidthDp
int32_t AConfiguration_getScreenWidthDp(AConfiguration* config)
Return the current configuration screen width in dp units, or
ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set.
- AConfiguration_getSdkVersion
int32_t AConfiguration_getSdkVersion(AConfiguration* config)
Return the current SDK (API) version set in the configuration.
- AConfiguration_getSmallestScreenWidthDp
int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config)
Return the configuration's smallest screen width in dp units, or
ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set.
- AConfiguration_getTouchscreen
int32_t AConfiguration_getTouchscreen(AConfiguration* config)
Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration.
- AConfiguration_getUiModeNight
int32_t AConfiguration_getUiModeNight(AConfiguration* config)
Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration.
- AConfiguration_getUiModeType
int32_t AConfiguration_getUiModeType(AConfiguration* config)
Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration.
- AConfiguration_isBetterThan
int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test, AConfiguration* requested)
Determine whether the configuration in 'test' is better than the existing
configuration in 'base'. If 'requested' is non-NULL, this decision is based
on the overall configuration given there. If it is NULL, this decision is
simply based on which configuration is more specific. Returns non-0 if
'test' is better than 'base'.
- AConfiguration_match
int32_t AConfiguration_match(AConfiguration* base, AConfiguration* requested)
Determine whether 'base' is a valid configuration for use within the
environment 'requested'. Returns 0 if there are any values in 'base'
that conflict with 'requested'. Returns 1 if it does not conflict.
- AConfiguration_new
AConfiguration* AConfiguration_new()
Create a new AConfiguration, initialized with no values set.
- AConfiguration_setCountry
void AConfiguration_setCountry(AConfiguration* config, char* country)
Set the current country code in the configuration, from the first two
characters in the string.
- AConfiguration_setDensity
void AConfiguration_setDensity(AConfiguration* config, int32_t density)
Set the current density in the configuration.
- AConfiguration_setKeyboard
void AConfiguration_setKeyboard(AConfiguration* config, int32_t keyboard)
Set the current keyboard in the configuration.
- AConfiguration_setKeysHidden
void AConfiguration_setKeysHidden(AConfiguration* config, int32_t keysHidden)
Set the current keys hidden in the configuration.
- AConfiguration_setLanguage
void AConfiguration_setLanguage(AConfiguration* config, char* language)
Set the current language code in the configuration, from the first two
characters in the string.
- AConfiguration_setLayoutDirection
void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value)
Set the configuration's layout direction.
- AConfiguration_setMcc
void AConfiguration_setMcc(AConfiguration* config, int32_t mcc)
Set the current MCC in the configuration. 0 to clear.
- AConfiguration_setMnc
void AConfiguration_setMnc(AConfiguration* config, int32_t mnc)
Set the current MNC in the configuration. 0 to clear.
- AConfiguration_setNavHidden
void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden)
Set the current nav hidden in the configuration.
- AConfiguration_setNavigation
void AConfiguration_setNavigation(AConfiguration* config, int32_t navigation)
Set the current navigation in the configuration.
- AConfiguration_setOrientation
void AConfiguration_setOrientation(AConfiguration* config, int32_t orientation)
Set the current orientation in the configuration.
- AConfiguration_setScreenHeightDp
void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value)
Set the configuration's current screen width in dp units.
- AConfiguration_setScreenLong
void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong)
Set the current screen long in the configuration.
- AConfiguration_setScreenRound
void AConfiguration_setScreenRound(AConfiguration* config, int32_t screenRound)
Set the current screen round in the configuration.
- AConfiguration_setScreenSize
void AConfiguration_setScreenSize(AConfiguration* config, int32_t screenSize)
Set the current screen size in the configuration.
- AConfiguration_setScreenWidthDp
void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value)
Set the configuration's current screen width in dp units.
- AConfiguration_setSdkVersion
void AConfiguration_setSdkVersion(AConfiguration* config, int32_t sdkVersion)
Set the current SDK version in the configuration.
- AConfiguration_setSmallestScreenWidthDp
void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value)
Set the configuration's smallest screen width in dp units.
- AConfiguration_setTouchscreen
void AConfiguration_setTouchscreen(AConfiguration* config, int32_t touchscreen)
Set the current touchscreen in the configuration.
- AConfiguration_setUiModeNight
void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight)
Set the current UI mode night in the configuration.
- AConfiguration_setUiModeType
void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType)
Set the current UI mode type in the configuration.